<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改小程序端用户')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-wcuser-edit" th:object="${wcSysUser}">
            <div class="form-group">
                <label class="col-sm-3 control-label">ID：</label>
                <div class="col-sm-8">
                    <input name="id" th:field="*{id}" class="form-control" type="text" readonly>
                </div>
            </div>

<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">微信用户OPENID：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="openid" th:field="*{openid}" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label is-required">用户名：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="username" th:field="*{username}" class="form-control" type="text" required>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">密码：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="password" th:field="*{password}" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->

            <div class="form-group">    
                <label class="col-sm-3 control-label">姓名：</label>
                <div class="col-sm-8">
                    <input name="realName" th:field="*{realName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">电话：</label>
                <div class="col-sm-8">
                    <input name="mobile" th:field="*{mobile}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">业务权限：</label>
                <div class="col-sm-8">
                    <select name="forsysuserId" class="form-control m-b" th:with="type=${@dict.getType('wc_yewreyfl')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictCode}"></option>
                    </select>

<!--                    <input name="forsysuserId"  class="form-control m-b"  type="text"  list="dataListForSelects" />-->

<!--                    <datalist id="dataListForSelects"  th:with="type=${@dict.getType('wc_yewreyfl')}">-->
<!--                        <option th:if="*{forsysuserId} eq ${dict.dictCode}"  th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictCode}"></option>-->
<!--                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictCode}"></option>-->

<!--                    </datalist>-->
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">邀请人：</label>
                <div class="col-sm-8">
                    <input name="parentUserId"  class="form-control m-b"  type="text" id="textSelect" list="dataListForSelect" />

                    <datalist id="dataListForSelect" th:with="type=${userList}">
                        <option th:if="*{parentUserId} eq ${user.id}" th:each="user : ${type}" th:text="${user.nameAndMobile}" th:value="${user.id}"></option>
                        <option th:each="user : ${type}" th:text="${user.nameAndMobile}" th:value="${user.id}"></option>

                    </datalist>
                    <span>*提示：第一个为推荐人</span>
<!--                    <select name="parentUserId" class="form-control m-b" th:with="type=${userList}">-->
<!--                        <option th:each="user : ${type}" th:text="${user.nameAndMobile}" th:value="${user.id}"></option>-->
<!--                    </select>-->
<!--                </div>-->
            </div>
        </form>

    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "system/wcuser";
        $("#form-wcuser-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-wcuser-edit').serialize());
            }
        }
    </script>
</body>
</html>